<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    session_start();
    if(!isset($_SESSION['usuario'])){
            header('location:../html/login.html');
         }
         
         echo '<center>
                <div id="conte">
                    <table id="cabecera" style="width:85%;padding-top:20px;">
                        <tr>
                            <td align="center"> <img id="imagen" src="../imagen/BANNERSIGI.jpg" width="1258" height="125" alt="BANNERSES"/>';
                       echo"</td>
                        </tr>
                        <tr>
                            <td align=right id='sesion'><strong>Sesion:</strong>  ".$_SESSION['nombre']."";
                                echo '<a href="../../controlador/php/sql/cerrarSesion.php"><img src="../imagen/cesesion.png" title="cerrar sesion" width="20" height="20" alt="csesion" align="absbottom"/> </a>
                            </td>
                        </tr>
                        <tr>
                            <td>';
?>
                                <html>
                                    <head>
                                        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                                        <title id="titulo">Reporte</title>
                                        <!-- Librerias jquery y hojas de estilo para creacion  del calendario -->
                                        <script src="js/jquery-1.9.1.min.js"></script>
                                        <script src="js/jquery-1.5.2.js" type="text/javascript"></script>
                                        <link rel="stylesheet" href="css/demos.css" type="text/css">
                                        <link rel="stylesheet" href="css/impresion.css" type="text/css" media="print">
                                        <link rel="stylesheet" href="css/jquery.ui.all.css" type="text/css">
                                        <script type="text/javascript" src="js/jquery.ui.core.js"></script>
                                        <script type="text/javascript" src="js/jquery.ui.widget.js"></script>
                                        <script type="text/javascript" src="js/jquery.ui.datepicker.js"></script>
                                        <link rel="stylesheet" href="css/pestana.css" />
                                        <script src="js/jquery-ui.js"></script>
                                        <title id="titulo">Reporte</title>

                                        <script>
                                            $(function() {
                                                    $( "#capass2" ).datepicker({ 
                                                     autoSize: true,
                                                     dayNames: ['Domingo', 'Lunes', 'Martes', 'Mi�rcoles', 'Jueves', 'Viernes', 'S�bado'],
                                                     dayNamesMin: ['Dom', 'Lu', 'Ma', 'Mi', 'Je', 'Vi', 'Sa'],
                                                     firstDay: 1,
                                                     monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
                                                     monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic'],
                                                     dateFormat: 'dd-mm-yy',
                                                     changeMonth: true,
                                                     changeYear: true,
                                                     yearRange: "-90:+0",


                                                    });
                                            });

                                            $(function() {
                                                    $( "#capass22" ).datepicker({ 
                                                     autoSize: true,
                                                     dayNames: ['Domingo', 'Lunes', 'Martes', 'Mi�rcoles', 'Jueves', 'Viernes', 'S�bado'],
                                                     dayNamesMin: ['Dom', 'Lu', 'Ma', 'Mi', 'Je', 'Vi', 'Sa'],
                                                     firstDay: 1,
                                                     monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
                                                     monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic'],
                                                     dateFormat: 'dd-mm-yy',
                                                     changeMonth: true,
                                                     changeYear: true,
                                                     yearRange: "-90:+0",

                                                    });
                                            });
                                        </script>
                                        <script>
                                                   function enviarDatos(){     
                                                            var capass2 = $("#capass2").val();
                                                            var capass22 = $("#capass22").val();
                                                            $.ajax({
                                                                type: "POST",
                                                                url: "../../laboratorio/controlador/php/sql/reporte2.php",
                                                                data: {capass2:capass2,capass22:capass22},
                                                                success: mostrarDatos,
                                                                timeout: 4000,
                                                                error: errorEnvio


                                                            });
                                                   }


                                                    function errorEnvio() {
                                                        alert("error!...");
                                                    }

                                                    function mostrarDatos( respuesta )
                                                    {
                                                       rpt = $.parseJSON(respuesta);
                                                        respuesta = $("#respuesta");
                                                        var f1 = $("#capass2").val();
                                                        var f2 = $("#capass22").val();
                                                        //respuesta.text("");
                                                        var resp="";
                                                        resp+=
                                                                ('<center>\n\
                                                                    <table id="Exportar_a_Excel" style="font-size: 81%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:50%;margin:1% auto 0;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);">\n\
                                                                              <tr align="center">\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Fecha</strong>\n\
                                                                                </td><td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Ingreso</strong></td>\n\
                                                                                </td><td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Documento</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Nombres</strong>\n\
                                                                                </td><td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Apellidos</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Servicio</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Componente<strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;""><strong>Grupo Sanguineo</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;""><strong>Tamizaje</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Numero Unidad</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Numero Sello</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Fecha Vencimiento</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>GSanguineo Unidad</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;""><strong>Rai 1</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;""><strong>Rai 2</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;""><strong>Auto Control</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;""><strong>Prueba Cruzada</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;""><strong>Interpretacion</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Responsable</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Quien Responde</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Hora Llamada</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Estado Unidad</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Temperatura</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Quien Entrega</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Recibe</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>F/H Entrega</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Numero Nevera</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Temperatura Nevera</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Observaciones</strong></td>\n\
                                                                                <td style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;"><strong>Sin Prueba Cruzada</strong></td>\n\
                                                                              </tr>');
                                                        for(usu in rpt){
                                                            
                                                            if(rpt[usu].ltr_componente === "pqm"){
                                                                var compo = "PLAQ MANUAL";
                                                            }else if(rpt[usu].ltr_componente === "grpl"){
                                                                compo = "GRPL";
                                                            }else if(rpt[usu].ltr_componente === "pfc"){
                                                                compo = "PFC";
                                                            }else if(rpt[usu].ltr_componente === "cro"){
                                                                compo = "CRIO";
                                                            }else if(rpt[usu].ltr_componente === "pqa"){
                                                                compo = "PLAQ POR AF";
                                                            }
                                                            else if(rpt[usu].ltr_componente === "grf"){
                                                                compo = "GRF";
                                                            }
                                                            
                                                            resp+=("<tr>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_fechaH+"</td>\n\
                                                                                <td onclick='libro("+ rpt[usu].adnIngreso +");' style='cursor:pointer;;padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].adnIngreso+"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].PACNUMDOC+"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].PACPRINOM+" "+ rpt[usu].PACSEGNOM +"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].PACPRIAPE+" "+ rpt[usu].PACSEGAPE +"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ser_descripcion+"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+ compo +"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+ rpt[usu].ltr_grupos +"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+ rpt[usu].ltr_tamizaje +"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_numU+"</td>\n\
                                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_numSe+"</td>\
                                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_fechaV+"</td>\
                                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_gruposu+"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_rai1+"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_rai2+"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_autoC+"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_pruebC+"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_interpret+"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].usures +"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_qrespon+"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_fechaHL+"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_estadoU+"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_tempS+"Cº"+"</td>\n\
                                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].qen +"</td>\n\
                                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_qrecibe+"</td>\n\
                                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_horaE+"</td>\n\
                                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_numN+"</td>\n\
                                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_tempN+"Cº"+"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+rpt[usu].ltr_observ+"</td>\n\
                                                                                <td style='padding:10px 10px 10px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>"+ rpt[usu].ltr_sinpc +"</td></tr>"
                                                                                );

                                                        }
                                                           resp+=("</table></center>");
                                                           if(rpt == null){
                                                               $("#respuesta").html("<table align='center'>\n\
                                                                                        <tr>\n\
                                                                                            <td><font color=red>" + "no se encuentra ninguna informacion con las respectivas fechas" + "</font>\n\
                                                                                            </td>\n\
                                                                                         </tr>\n\
                                                                                     </table>");
                                                               $('#capass2').attr('value','');
                                                               $('#capass22').attr('value','');
                                                           }else{
                                                               $("#respuesta").html("");
                                                               respuesta.append(resp);
                                                           }
                                                     }
                                        </script>
                                       
                                        <script>
                                            function validar(){
                                                fecha1 = document.getElementById("capass2");
                                                fecha2 = document.getElementById("capass22");

                                                if(fecha1.value ==""){
                                                    alert("campo vacion, por favor seleccione la fecha inicio");
                                                    return false;
                                                }else if(fecha2.value ==""){
                                                    alert("campo vacion, por favor seleccione la fecha fin");
                                                    return false;
                                                }
                                                return true;
                                            }

                                            function limpiar(){
                                                fecha = document.getElementById("capass2");
                                                fecha2 = document.getElementById("capass22");

                                                fecha.value = "";
                                                fecha2.value = "";
                                            }
                                        </script>
                                        <script language="javascript">
                                            $(document).ready(function() {
                                                $(".botonExcel").click(function(event) {
                                                    $("#datos_a_enviar").val( $("<div>").append( $("#Exportar_a_Excel").eq(0).clone()).html());
                                                    $("#FormularioExportacion").submit();
                                                });
                                            });
                                        </script>
                                        <script>
                                            function printDiv()
                                            {
                                                var divToPrint=document.getElementById('Exportar_a_Excel');
                                                newWin= window.open('');
                                                newWin.document.write(divToPrint.outerHTML);
                                                newWin.print();
                                                newWin.close();
                                            }
                                        </script>
                                        <script>
                                            $(function() {
                                                $( "#tabs" ).tabs();
                                            });

                                            function nuevo(){
                                                    document.location=("pacienteFecha.php");
                                                }
                                        </script>
                                        <script type="text/javascript">
                                            function imprSelec()
                                            {
                                                var ficha=document.getElementById('respuesta');var ventimp=window.open(' ','popimpr');ventimp.document.write(ficha.innerHTML);ventimp.document.close();ventimp.print();ventimp.close();
                                            }
                                            
                                            function libro(ingreso){
                                                document.location=("../php/lTransfusional.php?ingreso=" + ingreso);
                                            }
                                        </script>
                                        
                                    </head>
                                    <body>
                                        <div id="tabs">
                                            <ul>
                                                <li><a href="#tabs-1">Laboratorio</a></li>
                                            </ul>
                                            <div id="tabs-1">
                                                    <form id="reportes" method="post" action="javascript:enviarDatos()">
                                                        <table id="tabl">
                                                            <tr>
                                                                <td align="center" colspan="2">
                                                                    <strong>Libro Transfusional</strong>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="center" >
                                                                    Fecha inicial:
                                                                </td>
                                                                <td>
                                                                    <input  name="capa1" type="text" class="reporte_termino" id="capass2" size="12" style="width: 100px;height:25px;"/>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="center">
                                                                    Fecha final:
                                                                </td>
                                                                <td>
                                                                    <input  name="capa2" type="text" class="reporte_termino" id="capass22" size="12" style="width: 100px;height:25px;"/>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="center" colspan="2">
                                                                    <input  id="genREporte" type="submit" value="Generar" />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                        <table  align="right">
                                                            <tr>
                                                                <td>
                                                                    <img style="cursor: pointer;" title="atras" src="../imagen/atras.png" width="30" height="30" alt="atras" onclick="window.history.back();"/>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                        </br></br></br>
                                                        </form>
                                                        <div id="repo">
                                                        </div>
                                                        <hr id="sepa">
                                                        <table id="opci">
                                                            <tr>
                                                                <td>
                                                                    <form action="../../controlador/php/sql/excel.php" method="post" target="_blank" id="FormularioExportacion">
                                                                        <img title="generar en excel" src="../imagen/excel.png" width="30" height="30" class="botonExcel" />
                                                                        <input type="hidden" id="datos_a_enviar" name="datos_a_enviar" />
                                                                    </form>
                                                                </td>
                                                                <td  align="absbottom" >
                                                                    <a href="javascript:imprSelec()">
                                                                        <img title="imprimir" border="0" src="../imagen/imprimir.png" width="30" height="30">
                                                                    </a>

                                                                </td>
                                                            </tr>
                                                        </table>

                                                <div id="respuesta">

                                                </div>
                                            
                                            </div>

                                        </div>
                                    </body>
                                </html>
                           </td>
                       </tr>
               </table>
               </div>
              </center>

